In a driver in which high positioning accuracy is required in an industrial robot, a machine tool, or the like, a gear-attached motor, which is configured to output rotation of the motor via a reduction gear having high transmission accuracy, may be used. For example, as the gear-attached motor, a motor is disclosed in Japanese Unexamined Patent Application, First Publication No. 2001-241462 which includes a motor main body, a reduction gear which is connected to a rotating shaft of the motor main body in a coaxial state, and an output shaft which is connected to an output side of the reduction gear in a coaxial state.
In the motor described above, in order to accurately perform positioning or the like, it is necessary to control a rotation angle of the output shaft of the reduction gear with high accuracy. Accordingly, a first encoder is mounted on the rotating shaft of the motor, and a second encoder is mounted on the output shaft.